package com.zerowidth.moc.web.controller;

import com.zerowidth.moc.web.auth.annotation.NeedToken;
import com.zerowidth.moc.web.controller.service.SocialService;
import com.zerowidth.moc.web.resp.ResultBean;
import com.zerowidth.db.bean.CommentBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1")
public class SocialController {

    @Autowired
    SocialService socialService;

    @NeedToken
    @PostMapping("/comment")
    public ResponseEntity<ResultBean<CommentBean>> createComment(
            @RequestBody CommentBean commentBean) {
        return socialService.createSocial(commentBean);
    }


}
